<?php
class Silk_TermTaxonomys extends Silk_Gateway
{

    protected $_dao_class = 'Silk_Dao_TermTaxonomy';

    protected $_model_class = 'Silk_TermTaxonomy';

    protected $_primary_key = 'term_taxonomy_id';

    public function getSite($pTermTaxonomy)
    {
        $term_taxonomy = $this->getModelObject($pTermTaxonomy);

        $Sites = new Silk_Sites();

        return $Sites->fetch($term_taxonomy->site_id);
    }

    public function getTerm($pTermTaxonomy)
    {
        $term_taxonomy = $this->getModelObject($pTermTaxonomy);

        $Terms = new Silk_Terms();

        return $Terms->fetch($term_taxonomy->term_id);
    }

    public function getParent($pTermTaxonomy)
    {
        $term_taxonomy = $this->getModelObject($pTermTaxonomy);

        $TermTaxonomys = new Silk_TermTaxonomys();

        return $TermTaxonomys->fetch($term_taxonomy->parent_id);
    }

    public function getChildren($pTermTaxonomy)
    {
        $term_taxonomy_id = $this->getModelObjectId($pTermTaxonomy);

        $TermTaxonomys = new Silk_TermTaxonomys();

        return $TermTaxonomys->getTermTaxonomysForTermTaxonomy($term_taxonomy_id);
    }

    public function getObjects($pTermTaxonomy)
    {
        $term_taxonomy_id = $this->getModelObjectId($pTermTaxonomy);

        $Objects = new Silk_Objects();

        return $Objects->getObjectsForTermTaxonomy($term_taxonomy_id);
    }


}

 ?>